package com.bk.bookviews.exception;

/**
 * @description 自定义异常类
 */
public class BusinessException extends RuntimeException{

	private static final long serialVersionUID = 1L;

	//异常枚举类
    private BusinessExceptionEnum businessExceptionEnum;

    //可变参数数组
    private Object arr[];
    
    //返回码
    private String code;
    
    //返回的错误消息
    private String errMsg;

    public BusinessException(BusinessExceptionEnum businessExceptionEnum,Object ...args){
        this.businessExceptionEnum = businessExceptionEnum;
        this.arr = args;
    }
    
    public BusinessException(String code,String errMsg){
        this.code = code;
        this.errMsg = errMsg;
    }

    public BusinessExceptionEnum getBusinessExceptionEnum() {
        return businessExceptionEnum;
    }

    public void setBusinessExceptionEnum(BusinessExceptionEnum businessExceptionEnum) {
        this.businessExceptionEnum = businessExceptionEnum;
    }

    public Object[] getArr() {
        return arr;
    }

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getErrMsg() {
		return errMsg;
	}

	public void setErrMsg(String errMsg) {
		this.errMsg = errMsg;
	}

}
